<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.math</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.math";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.math.html" class="symbol">std.math</a></h1>
  
<dl>
<dt class="decl">template <a class="symbol _template" name="floatTraits" href="./htmlsrc/std.math.html#L98" kind="template" beg="98" end="161">floatTraits</a><span class="tparams">(T)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#floatTraits" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L98">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">ushort <a class="symbol _variable" name="floatTraits.EXPMASK" href="./htmlsrc/std.math.html#L105" kind="variable" beg="105" end="105">EXPMASK</a>; <span class="attrs">[<span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.EXPMASK" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L105">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">ushort <a class="symbol _variable" name="floatTraits.EXPBIAS" href="./htmlsrc/std.math.html#L106" kind="variable" beg="106" end="106">EXPBIAS</a>; <span class="attrs">[<span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.EXPBIAS" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L106">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">uint <a class="symbol _variable" name="floatTraits.EXPMASK_INT" href="./htmlsrc/std.math.html#L107" kind="variable" beg="107" end="107">EXPMASK_INT</a>; <span class="attrs">[<span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.EXPMASK_INT" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L107">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">uint <a class="symbol _variable" name="floatTraits.MANTISSAMASK_INT" href="./htmlsrc/std.math.html#L108" kind="variable" beg="108" end="108">MANTISSAMASK_INT</a>; <span class="attrs">[<span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.MANTISSAMASK_INT" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L108">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _variable" name="floatTraits.POW2MANTDIG" href="./htmlsrc/std.math.html#L109" kind="variable" beg="109" end="109">POW2MANTDIG</a>; <span class="attrs">[<span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.POW2MANTDIG" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L109">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">auto <a class="symbol _variable" name="MANTISSA_LSB" href="./htmlsrc/std.math.html#L165" kind="variable" beg="165" end="165">MANTISSA_LSB</a>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#MANTISSA_LSB" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L165">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">auto <a class="symbol _variable" name="MANTISSA_MSB" href="./htmlsrc/std.math.html#L166" kind="variable" beg="166" end="166">MANTISSA_MSB</a>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#MANTISSA_MSB" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L166">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">class <a class="symbol _class" name="NotImplemented" href="./htmlsrc/std.math.html#L173" kind="class" beg="173" end="179">NotImplemented</a> : Error; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#NotImplemented" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L173">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl"><a class="symbol _ctor" name="NotImplemented.this" href="./htmlsrc/std.math.html#L175" kind="ctor" beg="175" end="178">this</a><span class="params">(string <em>msg</em>)</span>; <a title="Permalink to this symbol" href="#NotImplemented.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L175">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">real <a class="symbol _variable" name="E" href="./htmlsrc/std.math.html#L181" kind="variable" beg="181" end="181">E</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#E" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L181">#</a></dt>
<dd class="ddef">
<div class="summary">e</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LOG2T" href="./htmlsrc/std.math.html#L183" kind="variable" beg="183" end="183">LOG2T</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#LOG2T" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L183">#</a></dt>
<dd class="ddef">
<div class="summary">log<sub>2</sub>10</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LOG2E" href="./htmlsrc/std.math.html#L185" kind="variable" beg="185" end="185">LOG2E</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#LOG2E" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L185">#</a></dt>
<dd class="ddef">
<div class="summary">log<sub>2</sub>e</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LOG2" href="./htmlsrc/std.math.html#L187" kind="variable" beg="187" end="187">LOG2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#LOG2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L187">#</a></dt>
<dd class="ddef">
<div class="summary">log<sub>10</sub>2</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LOG10E" href="./htmlsrc/std.math.html#L188" kind="variable" beg="188" end="188">LOG10E</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#LOG10E" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L188">#</a></dt>
<dd class="ddef">
<div class="summary">log<sub>10</sub>e</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LN2" href="./htmlsrc/std.math.html#L189" kind="variable" beg="189" end="189">LN2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#LN2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L189">#</a></dt>
<dd class="ddef">
<div class="summary">ln 2</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LN10" href="./htmlsrc/std.math.html#L190" kind="variable" beg="190" end="190">LN10</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#LN10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L190">#</a></dt>
<dd class="ddef">
<div class="summary">ln 10</div></dd>
<dt class="decl">real <a class="symbol _variable" name="PI" href="./htmlsrc/std.math.html#L191" kind="variable" beg="191" end="191">PI</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#PI" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L191">#</a></dt>
<dd class="ddef">
<div class="summary">&pi;</div></dd>
<dt class="decl">real <a class="symbol _variable" name="PI_2" href="./htmlsrc/std.math.html#L192" kind="variable" beg="192" end="192">PI_2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#PI_2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L192">#</a></dt>
<dd class="ddef">
<div class="summary">&pi; / 2</div></dd>
<dt class="decl">real <a class="symbol _variable" name="PI_4" href="./htmlsrc/std.math.html#L193" kind="variable" beg="193" end="193">PI_4</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#PI_4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L193">#</a></dt>
<dd class="ddef">
<div class="summary">&pi; / 4</div></dd>
<dt class="decl">real <a class="symbol _variable" name="M_1_PI" href="./htmlsrc/std.math.html#L194" kind="variable" beg="194" end="194">M_1_PI</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#M_1_PI" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L194">#</a></dt>
<dd class="ddef">
<div class="summary">1 / &pi;</div></dd>
<dt class="decl">real <a class="symbol _variable" name="M_2_PI" href="./htmlsrc/std.math.html#L195" kind="variable" beg="195" end="195">M_2_PI</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#M_2_PI" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L195">#</a></dt>
<dd class="ddef">
<div class="summary">2 / &pi;</div></dd>
<dt class="decl">real <a class="symbol _variable" name="M_2_SQRTPI" href="./htmlsrc/std.math.html#L196" kind="variable" beg="196" end="196">M_2_SQRTPI</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#M_2_SQRTPI" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L196">#</a></dt>
<dd class="ddef">
<div class="summary">2 / &radic;&pi;</div></dd>
<dt class="decl">real <a class="symbol _variable" name="SQRT2" href="./htmlsrc/std.math.html#L197" kind="variable" beg="197" end="197">SQRT2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#SQRT2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L197">#</a></dt>
<dd class="ddef">
<div class="summary">&radic;2</div></dd>
<dt class="decl">real <a class="symbol _variable" name="SQRT1_2" href="./htmlsrc/std.math.html#L198" kind="variable" beg="198" end="198">SQRT1_2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#SQRT1_2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L198">#</a></dt>
<dd class="ddef">
<div class="summary">&radic;&frac12;</div></dd>
<dt class="decl">real <a class="symbol _function" name="abs" href="./htmlsrc/std.math.html#L221" kind="function" beg="221" end="224">abs</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L221">#</a></dt>
<dt class="decl">long <a class="symbol _function" name="abs:2" href="./htmlsrc/std.math.html#L227" kind="function" beg="227" end="230">abs</a><span class="params">(long <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L227">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="abs:3" href="./htmlsrc/std.math.html#L233" kind="function" beg="233" end="236">abs</a><span class="params">(int <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L233">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="abs:4" href="./htmlsrc/std.math.html#L239" kind="function" beg="239" end="242">abs</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L239">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="abs:5" href="./htmlsrc/std.math.html#L245" kind="function" beg="245" end="248">abs</a><span class="params">(ireal <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L245">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the absolute value</div>
For complex numbers, abs(z) = sqrt( z.re<sup>2</sup> + z.im<sup>2</sup> )
 = hypot(z.re, z.im).</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.math.html#L251" kind="unittest" beg="251" end="261">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L251">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">creal <a class="symbol _function" name="conj" href="./htmlsrc/std.math.html#L271" kind="function" beg="271" end="274">conj</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#conj" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L271">#</a></dt>
<dt class="decl">ireal <a class="symbol _function" name="conj:2" href="./htmlsrc/std.math.html#L277" kind="function" beg="277" end="280">conj</a><span class="params">(ireal <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#conj:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L277">#</a></dt>
<dd class="ddef">
<div class="summary">Complex conjugate</div>
conj(x + iy) = x - iy
<p class="bl"/>
 Note that z * conj(z) = z.re<sup>2</sup> - z.im<sup>2</sup>
 is always a real number</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:2" href="./htmlsrc/std.math.html#L282" kind="unittest" beg="282" end="287">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L282">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="cos" href="./htmlsrc/std.math.html#L301" kind="function" beg="301" end="301">cos</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cos" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L301">#</a></dt>
<dd class="ddef">
<div class="summary">Returns cosine of x. x is in radians.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>cos(x)</th> <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>            <td><span class="red">NAN</span></td> <td>yes</td>     </tr>
      <tr><td>&plusmn;&infin;</td> <td><span class="red">NAN</span></td> <td>yes</td>     </tr>
      </table>
<p class="sec_header"><span class="red">Bugs:</span></p>Results are undefined if |x| &gt;= 2<sup>64</sup>.</dd>
<dt class="decl">real <a class="symbol _function" name="sin" href="./htmlsrc/std.math.html#L316" kind="function" beg="316" end="316">sin</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sin" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L316">#</a></dt>
<dd class="ddef">
<div class="summary">Returns sine of x. x is in radians.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>               <th>sin(x)</th>      <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>          <td><span class="red">NAN</span></td>      <td>yes</td></tr>
      <tr><td>&plusmn;0.0</td>    <td>&plusmn;0.0</td> <td>no</td></tr>
      <tr><td>&plusmn;&infin;</td>    <td><span class="red">NAN</span></td>      <td>yes</td></tr>
      </table>
<p class="sec_header"><span class="red">Bugs:</span></p>Results are undefined if |x| &gt;= 2<sup>64</sup>.</dd>
<dt class="decl">creal <a class="symbol _function" name="sin:2" href="./htmlsrc/std.math.html#L327" kind="function" beg="327" end="331">sin</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sin:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L327">#</a></dt>
<dt class="decl">ireal <a class="symbol _function" name="sin:3" href="./htmlsrc/std.math.html#L334" kind="function" beg="334" end="337">sin</a><span class="params">(ireal <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sin:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L334">#</a></dt>
<dd class="ddef">
<div class="summary">sine, complex and imaginary</div>
sin(z) = sin(z.re)*cosh(z.im) + cos(z.re)*sinh(z.im)i
<p class="bl"/>
 If both sin(&theta;) and cos(&theta;) are required,
 it is most efficient to use expi(&theta).</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:3" href="./htmlsrc/std.math.html#L339" kind="unittest" beg="339" end="342">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L339">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">creal <a class="symbol _function" name="cos:2" href="./htmlsrc/std.math.html#L349" kind="function" beg="349" end="353">cos</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cos:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L349">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="cos:3" href="./htmlsrc/std.math.html#L356" kind="function" beg="356" end="359">cos</a><span class="params">(ireal <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cos:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L356">#</a></dt>
<dd class="ddef">
<div class="summary">cosine, complex and imaginary</div>
cos(z) = cos(z.re)*cosh(z.im) - sin(z.re)*sinh(z.im)i</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:4" href="./htmlsrc/std.math.html#L361" kind="unittest" beg="361" end="366">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L361">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="tan" href="./htmlsrc/std.math.html#L379" kind="function" beg="379" end="413">tan</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#tan" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L379">#</a></dt>
<dd class="ddef">
<div class="summary">Returns tangent of x. x is in radians.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>             <th>tan(x)</th>       <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>        <td><span class="red">NAN</span></td>       <td>yes</td></tr>
      <tr><td>&plusmn;0.0</td>  <td>&plusmn;0.0</td> <td>no</td></tr>
      <tr><td>&plusmn;&infin;</td>  <td><span class="red">NAN</span></td>       <td>yes</td></tr>
      </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:5" href="./htmlsrc/std.math.html#L415" kind="unittest" beg="415" end="467">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L415">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="acos" href="./htmlsrc/std.math.html#L480" kind="function" beg="480" end="480">acos</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#acos" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L480">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the arc cosine of x,
 returning a value ranging from -&pi;/2 to &pi;/2.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>         <th>acos(x)</th> <th>invalid?</th></tr>
      <tr><td>&gt;1.0</td>  <td><span class="red">NAN</span></td>  <td>yes</td></tr>
      <tr><td>&lt;-1.0</td> <td><span class="red">NAN</span></td>  <td>yes</td></tr>
      <tr><td><span class="red">NAN</span></td>    <td><span class="red">NAN</span></td>  <td>yes</td></tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="asin" href="./htmlsrc/std.math.html#L493" kind="function" beg="493" end="493">asin</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#asin" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L493">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the arc sine of x,
 returning a value ranging from -&pi;/2 to &pi;/2.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>            <th>asin(x)</th>      <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td> <td>&plusmn;0.0</td> <td>no</td></tr>
      <tr><td>&gt;1.0</td>     <td><span class="red">NAN</span></td>       <td>yes</td></tr>
      <tr><td>&lt;-1.0</td>    <td><span class="red">NAN</span></td>       <td>yes</td></tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="atan" href="./htmlsrc/std.math.html#L505" kind="function" beg="505" end="505">atan</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#atan" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L505">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the arc tangent of x,
 returning a value ranging from -&pi;/2 to &pi;/2.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>atan(x)</th>      <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td> <td>no</td></tr>
      <tr><td>&plusmn;&infin;</td> <td><span class="red">NAN</span></td>       <td>yes</td></tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="atan2" href="./htmlsrc/std.math.html#L528" kind="function" beg="528" end="528">atan2</a><span class="params">(real <em>y</em>, real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#atan2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L528">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the arc tangent of y / x,
 returning a value ranging from -&pi; to &pi;.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>y</th>                 <th>x</th>            <th>atan(y, x)</th></tr>
      <tr><td><span class="red">NAN</span></td>            <td>anything</td>     <td><span class="red">NAN</span></td> </tr>
      <tr><td>anything</td>          <td><span class="red">NAN</span></td>       <td><span class="red">NAN</span></td> </tr>
      <tr><td>&plusmn;0.0</td>      <td>&gt;0.0</td>     <td>&plusmn;0.0</td> </tr>
      <tr><td>&plusmn;0.0</td>      <td>+0.0</td>         <td>&plusmn;0.0</td> </tr>
      <tr><td>&plusmn;0.0</td>      <td>&lt;0.0</td>     <td>&plusmn;&pi;</td></tr>
      <tr><td>&plusmn;0.0</td>      <td>-0.0</td>         <td>&plusmn;&pi;</td></tr>
      <tr><td>&gt;0.0</td>          <td>&plusmn;0.0</td> <td>&pi;/2</td> </tr>
      <tr><td>&lt;0.0</td>          <td>&plusmn;0.0</td> <td>-&pi;/2</td> </tr>
      <tr><td>&gt;0.0</td>          <td>&infin;</td>     <td>&plusmn;0.0</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>anything</td>     <td>&plusmn;&pi;/2</td></tr>
      <tr><td>&gt;0.0</td>          <td>-&infin;</td>    <td>&plusmn;&pi;</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>&infin;</td>     <td>&plusmn;&pi;/4</td></tr>
      <tr><td>&plusmn;&infin;</td> <td>-&infin;</td>    <td>&plusmn;3&pi;/4</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="cosh" href="./htmlsrc/std.math.html#L538" kind="function" beg="538" end="538">cosh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cosh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L538">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the hyperbolic cosine of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>cosh(x)</th>      <th>invalid?</th></tr>
      <tr><td>&plusmn;&infin;</td> <td>&plusmn;0.0</td> <td>no</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="sinh" href="./htmlsrc/std.math.html#L549" kind="function" beg="549" end="549">sinh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sinh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L549">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the hyperbolic sine of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>sinh(x)</th>           <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td>      <td>no</td></tr>
      <tr><td>&plusmn;&infin;</td> <td>&plusmn;&infin;</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="tanh" href="./htmlsrc/std.math.html#L560" kind="function" beg="560" end="560">tanh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#tanh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L560">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the hyperbolic tangent of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>tanh(x)</th>      <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td> <td>no</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>&plusmn;1.0</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="acosh" href="./htmlsrc/std.math.html#L582" kind="function" beg="582" end="588">acosh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#acosh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L582">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the inverse hyperbolic cosine of x.</div>
Mathematically, acosh(x) = log(x + sqrt( x*x - 1))
<p class="bl"/>
 <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <!-- undefined macro in std/math.d -->
  <!-- undefined macro in std/math.d --> </table>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>acosh(x) </th></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span> </td></tr>
    <tr><td><1</td> <td><span class="red">NAN</span> </td></tr>
    <tr><td>1</td> <td>0       </td></tr>
    <tr><td>+&infin;</td> <td>+&infin;</td></tr>
  </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:6" href="./htmlsrc/std.math.html#L590" kind="unittest" beg="590" end="596">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L590">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="asinh" href="./htmlsrc/std.math.html#L614" kind="function" beg="614" end="622">asinh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#asinh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L614">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the inverse hyperbolic sine of x.</div>
Mathematically,
  <pre class="d_code">
<span class="i">asinh</span>(<span class="i">x</span>) =  <span class="i">log</span>( <span class="i">x</span> + <span class="i">sqrt</span>( <span class="i">x</span>*<span class="i">x</span> + <span class="n">1</span> )) <span class="lc">// if x &gt;= +0</span>
<span class="i">asinh</span>(<span class="i">x</span>) = -<span class="i">log</span>(-<span class="i">x</span> + <span class="i">sqrt</span>( <span class="i">x</span>*<span class="i">x</span> + <span class="n">1</span> )) <span class="lc">// if x &lt;= -0</span>
</pre>
<p class="bl"/>
    <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>asinh(x)       </th></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span>         </td></tr>
    <tr><td>&plusmn;0</td> <td>&plusmn;0      </td></tr>
    <tr><td>&plusmn;&infin;</td> <td>&plusmn;&infin;</td></tr>
    </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:7" href="./htmlsrc/std.math.html#L624" kind="unittest" beg="624" end="631">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:7" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L624">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="atanh" href="./htmlsrc/std.math.html#L650" kind="function" beg="650" end="654">atanh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#atanh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L650">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the inverse hyperbolic tangent of x,
 returning a value from ranging from -1 to 1.
  
 Mathematically, atanh(x) = log( (1+x)/(1-x) ) / 2</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <!-- undefined macro in std/math.d -->
  <!-- undefined macro in std/math.d --> </table>
 <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>acosh(x) </th></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span> </td></tr>
    <tr><td>&plusmn;0</td> <td>&plusmn;0</td></tr>
    <tr><td>-&infin;</td> <td>-0</td></tr>
 </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:8" href="./htmlsrc/std.math.html#L656" kind="unittest" beg="656" end="662">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:8" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L656">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">long <a class="symbol _function" name="rndtol" href="./htmlsrc/std.math.html#L670" kind="function" beg="670" end="670">rndtol</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#rndtol" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L670">#</a></dt>
<dd class="ddef">
<div class="summary">Returns x rounded to a long value using the current rounding mode.
 If the integer value of x is
 greater than long.max, the result is
 indeterminate.</div></dd>
<dt class="decl">real <a class="symbol _function" name="rndtonl" href="./htmlsrc/std.math.html#L679" kind="function" beg="679" end="679">rndtonl</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="linkg">extern(C)</span>]</span> <a title="Permalink to this symbol" href="#rndtonl" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L679">#</a></dt>
<dd class="ddef">
<div class="summary">Returns x rounded to a long value using the FE_TONEAREST rounding mode.
 If the integer value of x is
 greater than long.max, the result is
 indeterminate.</div></dd>
<dt class="decl">float <a class="symbol _function" name="sqrt" href="./htmlsrc/std.math.html#L692" kind="function" beg="692" end="692">sqrt</a><span class="params">(float <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sqrt" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L692">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="sqrt:3" href="./htmlsrc/std.math.html#L694" kind="function" beg="694" end="694">sqrt</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sqrt:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L694">#</a></dt>
<dt class="decl">creal <a class="symbol _function" name="sqrt:4" href="./htmlsrc/std.math.html#L696" kind="function" beg="696" end="735">sqrt</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sqrt:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L696">#</a></dt>
<dd class="ddef">
<div class="summary">Compute square root of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>         <th>sqrt(x)</th>   <th>invalid?</th></tr>
      <tr><td>-0.0</td>      <td>-0.0</td>      <td>no</td></tr>
      <tr><td>&lt;0.0</td>  <td><span class="red">NAN</span></td>    <td>yes</td></tr>
      <tr><td>+&infin;</td> <td>+&infin;</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">double <a class="symbol _function" name="sqrt:2" href="./htmlsrc/std.math.html#L693" kind="function" beg="693" end="693">sqrt</a><span class="params">(double <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sqrt:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L693">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="exp" href="./htmlsrc/std.math.html#L746" kind="function" beg="746" end="746">exp</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#exp" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L746">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates e<span style="vertical-align:super;font-size:smaller">x</span>.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>         <th>exp(x)</th></tr>
      <tr><td>+&infin;</td> <td>+&infin;</td> </tr>
      <tr><td>-&infin;</td> <td>+0.0</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="exp2" href="./htmlsrc/std.math.html#L757" kind="function" beg="757" end="757">exp2</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#exp2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L757">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates 2<span style="vertical-align:super;font-size:smaller">x</span>.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>         <th>exp2(x)</th></tr>
      <tr><td>+&infin;</td> <td>+&infin;</td></tr>
      <tr><td>-&infin;</td> <td>+0.0</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="expm1" href="./htmlsrc/std.math.html#L774" kind="function" beg="774" end="774">expm1</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#expm1" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L774">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the value of the natural logarithm base (e)
 raised to the power of x, minus 1.</div>
For very small x, expm1(x) is more accurate 
 than exp(x)-1. 
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>            <th>e<span style="vertical-align:super;font-size:smaller">x</span>-1</th></tr>
      <tr><td>&plusmn;0.0</td> <td>&plusmn;0.0</td></tr>
      <tr><td>+&infin;</td>    <td>+&infin;</td></tr>
      <tr><td>-&infin;</td>    <td>-1.0</td></tr>
      </table></dd>
<dt class="decl">creal <a class="symbol _function" name="expi" href="./htmlsrc/std.math.html#L783" kind="function" beg="783" end="798">expi</a><span class="params">(real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#expi" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L783">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate cos(y) + i sin(y).</div>
On many CPUs (such as x86), this is a very efficient operation;
 almost twice as fast as calculating sin(y) and cos(y) separately,
 and is the preferred method when both are required.</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:9" href="./htmlsrc/std.math.html#L800" kind="unittest" beg="800" end="804">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:9" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L800">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="frexp" href="./htmlsrc/std.math.html#L824" kind="function" beg="824" end="928">frexp</a><span class="params">(real <em>value</em>, out int <em>exp</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#frexp" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L824">#</a></dt>
<dd class="ddef">
<div class="summary">Separate floating point value into significand and exponent.</div>
<p class="sec_header">Returns:</p>Calculate and return <i>x</i> and exp such that
      value =<i>x</i>*2<span style="vertical-align:super;font-size:smaller">exp</span> and
      .5 &lt;= |<i>x</i>| &lt; 1.0<br>
      <i>x</i> has same sign as value.
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>value</th>           <th>returns</th>         <th>exp</th></tr>
      <tr><td>&plusmn;0.0</td>    <td>&plusmn;0.0</td>    <td>0</td></tr>
      <tr><td>+&infin;</td>       <td>+&infin;</td>       <td>int.max</td></tr>
      <tr><td>-&infin;</td>       <td>-&infin;</td>       <td>int.min</td></tr>
      <tr><td>&plusmn;<span class="red">NAN</span></td> <td>&plusmn;<span class="red">NAN</span></td> <td>int.min</td></tr>
      </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:10" href="./htmlsrc/std.math.html#L931" kind="unittest" beg="931" end="980">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L931">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="ilogb" href="./htmlsrc/std.math.html#L995" kind="function" beg="995" end="995">ilogb</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#ilogb" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L995">#</a></dt>
<dd class="ddef">
<div class="summary">Extracts the exponent of x as a signed integral value.</div>
If x is not a special value, the result is the same as
 <tt>cast(int)logb(x)</tt>.
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                <th>ilogb(x)</th>     <th>Range error?</th></tr>
      <tr><td>0</td>                 <td>FP_ILOGB0</td>   <td>yes</td></tr>
      <tr><td>&plusmn;&infin;</td> <td>int.max</td>     <td>no</td></tr>
      <tr><td><span class="red">NAN</span></td>            <td>FP_ILOGBNAN</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">alias std.c.math.FP_ILOGB0 <a class="symbol _alias" name="FP_ILOGB0" href="./htmlsrc/std.math.html#L997" kind="alias" beg="997" end="997">FP_ILOGB0</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#FP_ILOGB0" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L997">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">alias std.c.math.FP_ILOGBNAN <a class="symbol _alias" name="FP_ILOGBNAN" href="./htmlsrc/std.math.html#L998" kind="alias" beg="998" end="998">FP_ILOGBNAN</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#FP_ILOGBNAN" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L998">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="ldexp" href="./htmlsrc/std.math.html#L1006" kind="function" beg="1006" end="1006">ldexp</a><span class="params">(real <em>n</em>, int <em>exp</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#ldexp" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1006">#</a></dt>
<dd class="ddef">
<div class="summary">Compute n * 2<span style="vertical-align:super;font-size:smaller">exp</span></div>
<p class="sec_header">References:</p>frexp</dd>
<dt class="decl">real <a class="symbol _function" name="log" href="./htmlsrc/std.math.html#L1019" kind="function" beg="1019" end="1019">log</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#log" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1019">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the natural logarithm of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th>            <th>log(x)</th>    <th>divide by 0?</th> <th>invalid?</th></tr>
    <tr><td>&plusmn;0.0</td> <td>-&infin;</td> <td>yes</td>          <td>no</td></tr>
    <tr><td>&lt;0.0</td>     <td><span class="red">NAN</span></td>    <td>no</td>           <td>yes</td></tr>
    <tr><td>+&infin;</td>    <td>+&infin;</td> <td>no</td>           <td>no</td></tr>
    </table></dd>
<dt class="decl">real <a class="symbol _function" name="log10" href="./htmlsrc/std.math.html#L1032" kind="function" beg="1032" end="1032">log10</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#log10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1032">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the base-10 logarithm of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>            <th>log10(x)</th>  <th>divide by 0?</th> <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td> <td>-&infin;</td> <td>yes</td>          <td>no</td></tr>
      <tr><td>&lt;0.0</td>     <td><span class="red">NAN</span></td>    <td>no</td>           <td>yes</td></tr>
      <tr><td>+&infin;</td>    <td>+&infin;</td> <td>no</td>           <td>no</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="log1p" href="./htmlsrc/std.math.html#L1049" kind="function" beg="1049" end="1049">log1p</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#log1p" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1049">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the natural logarithm of 1 + x.</div>
For very small x, log1p(x) will be more accurate than 
      log(1 + x). 
<p class="bl"/>
  <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>            <th>log1p(x)</th>     <th>divide by 0?</th> <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td> <td>&plusmn;0.0</td> <td>no</td>           <td>no</td></tr>
  <tr><td>-1.0</td>         <td>-&infin;</td>    <td>yes</td>          <td>no</td></tr>
  <tr><td>&lt;-1.0</td>    <td><span class="red">NAN</span></td>       <td>no</td>           <td>yes</td></tr>
  <tr><td>+&infin;</td>    <td>-&infin;</td>    <td>no</td>           <td>no</td></tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="log2" href="./htmlsrc/std.math.html#L1062" kind="function" beg="1062" end="1062">log2</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#log2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1062">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the base-2 logarithm of x:
 log<sub>2</sub>x</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>            <th>log2(x)</th>   <th>divide by 0?</th> <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td> <td>-&infin;</td> <td>yes</td>          <td>no</td> </tr>
  <tr><td>&lt;0.0</td>     <td><span class="red">NAN</span></td>    <td>no</td>           <td>yes</td> </tr>
  <tr><td>+&infin;</td>    <td>+&infin;</td> <td>no</td>           <td>no</td> </tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="logb" href="./htmlsrc/std.math.html#L1078" kind="function" beg="1078" end="1078">logb</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#logb" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1078">#</a></dt>
<dd class="ddef">
<div class="summary">Extracts the exponent of x as a signed integral value.</div>
If x is subnormal, it is treated as if it were normalized.
 For a positive, finite x: 
<p class="bl"/>
 1 &lt;= <i>x</i> * FLT_RADIX<span style="vertical-align:super;font-size:smaller">-logb(x)</span> &lt; FLT_RADIX 
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>logb(x)</th>   <th>divide by 0?</th> </tr>
      <tr><td>&plusmn;&infin;</td> <td>+&infin;</td> <td>no</td></tr>
      <tr><td>&plusmn;0.0</td>      <td>-&infin;</td> <td>yes</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="modf" href="./htmlsrc/std.math.html#L1094" kind="function" beg="1094" end="1094">modf</a><span class="params">(real <em>x</em>, inout real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#modf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1094">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the remainder from the calculation x/y.</div>
<p class="sec_header">Returns:</p>The value of x - i * y, where i is the number of times that y can 
 be completely subtracted from x. The result has the same sign as x. 
<p class="bl"/>
 <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>              <th>y</th>             <th>modf(x, y)</th>   <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td>   <td>not 0.0</td>       <td>&plusmn;0.0</td> <td>no</td></tr>
  <tr><td>&plusmn;&infin;</td>   <td>anything</td>      <td><span class="red">NAN</span></td>       <td>yes</td></tr>
  <tr><td>anything</td>       <td>&plusmn;0.0</td>  <td><span class="red">NAN</span></td>       <td>yes</td></tr>
  <tr><td>!=&plusmn;&infin;</td> <td>&plusmn;&infin;</td>  <td>x</td>            <td>no</td></tr>
 </table></dd>
<dt class="decl">real <a class="symbol _function" name="scalbn" href="./htmlsrc/std.math.html#L1108" kind="function" beg="1108" end="1121">scalbn</a><span class="params">(real <em>x</em>, int <em>n</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#scalbn" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1108">#</a></dt>
<dd class="ddef">
<div class="summary">Efficiently calculates x * 2<span style="vertical-align:super;font-size:smaller">n</span>.</div>
scalbn handles underflow and overflow in 
 the same fashion as the basic arithmetic operators. 
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>scalb(x)</th></tr>
      <tr><td>&plusmn;&infin;</td>      <td>&plusmn;&infin;</td> </tr>
      <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td> </tr>
      </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:11" href="./htmlsrc/std.math.html#L1123" kind="unittest" beg="1123" end="1125">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:11" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1123">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="cbrt" href="./htmlsrc/std.math.html#L1137" kind="function" beg="1137" end="1137">cbrt</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cbrt" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1137">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the cube root of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th><i>x</i></th>            <th>cbrt(x)</th>           <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td>      <td>no</td> </tr>
      <tr><td><span class="red">NAN</span></td>            <td><span class="red">NAN</span></td>            <td>yes</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>&plusmn;&infin;</td> <td>no</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="fabs" href="./htmlsrc/std.math.html#L1149" kind="function" beg="1149" end="1149">fabs</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fabs" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1149">#</a></dt>
<dd class="ddef">
<div class="summary">Returns |x|</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>fabs(x)</th></tr>
      <tr><td>&plusmn;0.0</td>      <td>+0.0</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>+&infin;</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="hypot" href="./htmlsrc/std.math.html#L1171" kind="function" beg="1171" end="1241">hypot</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#hypot" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1171">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the length of the 
 hypotenuse of a right-angled triangle with sides of length x and y. 
 The hypotenuse is the value of the square root of 
 the sums of the squares of x and y:</div>
sqrt(x<sup>2</sup> + y<sup>2</sup>)
<p class="bl"/>
 Note that hypot(x, y), hypot(y, x) and
 hypot(x, -y) are equivalent.
<p class="bl"/>
  <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>            <th>y</th>            <th>hypot(x, y)</th> <th>invalid?</th></tr>
  <tr><td>x</td>            <td>&plusmn;0.0</td> <td>|x|</td>         <td>no</td></tr>
  <tr><td>&plusmn;&infin;</td> <td>y</td>            <td>+&infin;</td>   <td>no</td></tr>
  <tr><td>&plusmn;&infin;</td> <td><span class="red">NAN</span></td>       <td>+&infin;</td>   <td>no</td></tr>
  </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:12" href="./htmlsrc/std.math.html#L1243" kind="unittest" beg="1243" end="1266">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:12" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1243">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="erf" href="./htmlsrc/std.math.html#L1273" kind="function" beg="1273" end="1273">erf</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#erf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1273">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the error function of x.</div>
<img src="erf.gif" alt="error function"></dd>
<dt class="decl">real <a class="symbol _function" name="erfc" href="./htmlsrc/std.math.html#L1280" kind="function" beg="1280" end="1280">erfc</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#erfc" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1280">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the complementary error function of x, which is 1 - erf(x).</div>
<img src="erfc.gif" alt="complementary error function"></dd>
<dt class="decl">real <a class="symbol _function" name="lgamma" href="./htmlsrc/std.math.html#L1298" kind="function" beg="1298" end="1303">lgamma</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#lgamma" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1298">#</a></dt>
<dd class="ddef">
<div class="summary">Natural logarithm of gamma function.</div>
Returns the base e (2.718...) logarithm of the absolute
 value of the gamma function of the argument.
<p class="bl"/>
 For reals, lgamma is equivalent to log(fabs(gamma(x))).
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>lgamma(x)</th> <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>            <td><span class="red">NAN</span></td>    <td>yes</td></tr>
      <tr><td>integer <= 0</td>      <td>+&infin;</td> <td>yes</td></tr>
      <tr><td>&plusmn;&infin;</td> <td>+&infin;</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="tgamma" href="./htmlsrc/std.math.html#L1329" kind="function" beg="1329" end="1334">tgamma</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#tgamma" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1329">#</a></dt>
<dd class="ddef">
<div class="summary">The Gamma function, &#915;(x)</div>
&#915;(x) is a generalisation of the factorial function
  to real and complex numbers.
  Like x!, &#915;(x+1) = x*&#915;(x).
<p class="bl"/>
  Mathematically, if z.re &gt; 0 then
   &#915;(z) = <big>&#8747;<sub><small>0</small></sub><sup>&infin;</sup></big> t<sup>z-1</sup>e<sup>-t</sup> dt
<p class="bl"/>
    <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>              <th>&#915;(x)</th>       <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>         <td><span class="red">NAN</span></td>            <td>yes</td></tr>
      <tr><td>&plusmn;0.0</td>   <td>&plusmn;&infin;</td>      <td>yes</td></tr>
      <tr><td>integer &gt;0</td> <td>(x-1)!</td>            <td>no</td></tr>
      <tr><td>integer &lt;0</td> <td><span class="red">NAN</span></td>            <td>yes</td></tr>
      <tr><td>+&infin;</td>      <td>+&infin;</td>         <td>no</td></tr>
      <tr><td>-&infin;</td>      <td><span class="red">NAN</span></td>            <td>yes</td></tr>
    </table>
<p class="sec_header">References:</p><a href="http://en.wikipedia.org/wiki/Gamma_function">http://en.wikipedia.org/wiki/Gamma_function</a>,
      <a href="http://www.netlib.org/cephes/ldoubdoc.html#gamma">http://www.netlib.org/cephes/ldoubdoc.html#gamma</a></dd>
<dt class="decl">real <a class="symbol _function" name="ceil" href="./htmlsrc/std.math.html#L1340" kind="function" beg="1340" end="1340">ceil</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#ceil" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1340">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the value of x rounded upward to the next integer
 (toward positive infinity).</div></dd>
<dt class="decl">real <a class="symbol _function" name="floor" href="./htmlsrc/std.math.html#L1346" kind="function" beg="1346" end="1346">floor</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#floor" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1346">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the value of x rounded downward to the next integer
 (toward negative infinity).</div></dd>
<dt class="decl">real <a class="symbol _function" name="nearbyint" href="./htmlsrc/std.math.html#L1355" kind="function" beg="1355" end="1355">nearbyint</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nearbyint" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1355">#</a></dt>
<dd class="ddef">
<div class="summary">Rounds x to the nearest integer value, using the current rounding 
 mode.</div>
Unlike the rint functions, nearbyint does not raise the 
 FE_INEXACT exception.</dd>
<dt class="decl">real <a class="symbol _function" name="rint" href="./htmlsrc/std.math.html#L1365" kind="function" beg="1365" end="1365">rint</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#rint" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1365">#</a></dt>
<dd class="ddef">
<div class="summary">Rounds x to the nearest integer value, using the current rounding
 mode.
 If the return value is not equal to x, the FE_INEXACT
 exception is raised.
 <b>nearbyint</b> performs
 the same operation, but does not set the FE_INEXACT exception.</div></dd>
<dt class="decl">long <a class="symbol _function" name="lrint" href="./htmlsrc/std.math.html#L1377" kind="function" beg="1377" end="1393">lrint</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#lrint" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1377">#</a></dt>
<dd class="ddef">
<div class="summary">Rounds x to the nearest integer value, using the current rounding
 mode.</div>
This is generally the fastest method to convert a floating-point number
 to an integer. Note that the results from this function
 depend on the rounding mode, if the fractional part of x is exactly 0.5.
 If using the default rounding mode (ties round to even integers)
 lrint(4.5) == 4, lrint(5.5)==6.</dd>
<dt class="decl">real <a class="symbol _function" name="round" href="./htmlsrc/std.math.html#L1400" kind="function" beg="1400" end="1400">round</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#round" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1400">#</a></dt>
<dd class="ddef">
<div class="summary">Return the value of x rounded to the nearest integer.
 If the fractional part of x is exactly 0.5, the return value is rounded to
 the even integer.</div></dd>
<dt class="decl">long <a class="symbol _function" name="lround" href="./htmlsrc/std.math.html#L1410" kind="function" beg="1410" end="1416">lround</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#lround" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1410">#</a></dt>
<dd class="ddef">
<div class="summary">Return the value of x rounded to the nearest integer.</div>
If the fractional part of x is exactly 0.5, the return value is rounded
 away from zero.
<p class="sec_header">Note:</p>Not supported on windows</dd>
<dt class="decl">real <a class="symbol _function" name="trunc" href="./htmlsrc/std.math.html#L1423" kind="function" beg="1423" end="1423">trunc</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#trunc" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1423">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the integer portion of x, dropping the fractional portion.</div>
This is also known as "chop" rounding.</dd>
<dt class="decl">real <a class="symbol _function" name="remainder" href="./htmlsrc/std.math.html#L1447" kind="function" beg="1447" end="1447">remainder</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#remainder" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1447">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the remainder x REM y, following IEC 60559.</div>
REM is the value of x - y * n, where n is the integer nearest the exact 
 value of x / y.
 If |n - x / y| == 0.5, n is even.
 If the result is zero, it has the same sign as x.
 Otherwise, the sign of the result is the sign of x / y.
 Precision mode has no effect on the remainder functions.
<p class="bl"/>
 remquo returns n in the parameter n.
<p class="bl"/>
 <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>               <th>y</th>            <th>remainder(x, y)</th> <th>n</th>   <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td>    <td>not 0.0</td>      <td>&plusmn;0.0</td>    <td>0.0</td> <td>no</td></tr>
  <tr><td>&plusmn;&infin;</td>    <td>anything</td>     <td><span class="red">NAN</span></td>          <td>?</td>   <td>yes</td></tr>
  <tr><td>anything</td>        <td>&plusmn;0.0</td> <td><span class="red">NAN</span></td>          <td>?</td>   <td>yes</td></tr>
  <tr><td>!= &plusmn;&infin;</td> <td>&plusmn;&infin;</td> <td>x</td>               <td>?</td>   <td>no</td></tr>
 </table>
<p class="sec_header">Note:</p>remquo not supported on windows</dd>
<dt class="decl">real <a class="symbol _function" name="remquo" href="./htmlsrc/std.math.html#L1449" kind="function" beg="1449" end="1455">remquo</a><span class="params">(real <em>x</em>, real <em>y</em>, out int <em>n</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#remquo" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1449">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="isnan" href="./htmlsrc/std.math.html#L1461" kind="function" beg="1461" end="1481">isnan</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isnan" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1461">#</a></dt>
<dd class="ddef">
<div class="summary">Returns !=0 if e is a NaN.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:13" href="./htmlsrc/std.math.html#L1483" kind="unittest" beg="1483" end="1491">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:13" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1483">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="isfinite" href="./htmlsrc/std.math.html#L1497" kind="function" beg="1497" end="1502">isfinite</a><span class="params">(real <em>e</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isfinite" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1497">#</a></dt>
<dd class="ddef">
<div class="summary">Returns !=0 if e is finite (not infinite or <span class="red">NAN</span>).</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:14" href="./htmlsrc/std.math.html#L1504" kind="unittest" beg="1504" end="1509">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:14" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1504">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="isnormal" href="./htmlsrc/std.math.html#L1520" kind="function" beg="1520" end="1531">isnormal</a><span class="tparams">(X)</span><span class="params">(X <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isnormal" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1520">#</a></dt>
<dd class="ddef">
<div class="summary">Returns !=0 if x is normalized (not zero, subnormal, infinite, or <span class="red">NAN</span>).</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:15" href="./htmlsrc/std.math.html#L1534" kind="unittest" beg="1534" end="1551">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:15" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1534">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="issubnormal" href="./htmlsrc/std.math.html#L1562" kind="function" beg="1562" end="1566">issubnormal</a><span class="params">(float <em>f</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#issubnormal" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1562">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="issubnormal:2" href="./htmlsrc/std.math.html#L1578" kind="function" beg="1578" end="1583">issubnormal</a><span class="params">(double <em>d</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#issubnormal:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1578">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="issubnormal:3" href="./htmlsrc/std.math.html#L1595" kind="function" beg="1595" end="1613">issubnormal</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#issubnormal:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1595">#</a></dt>
<dd class="ddef">
<div class="summary">Is number subnormal? (Also called "denormal".)
 Subnormals have a 0 exponent and a 0 most significant mantissa bit.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:16" href="./htmlsrc/std.math.html#L1568" kind="unittest" beg="1568" end="1574">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:16" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1568">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:17" href="./htmlsrc/std.math.html#L1585" kind="unittest" beg="1585" end="1591">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:17" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1585">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:18" href="./htmlsrc/std.math.html#L1614" kind="unittest" beg="1614" end="1620">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:18" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1614">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="isinf" href="./htmlsrc/std.math.html#L1626" kind="function" beg="1626" end="1645">isinf</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isinf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1626">#</a></dt>
<dd class="ddef">
<div class="summary">Return !=0 if e is &plusmn;&infin;.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:19" href="./htmlsrc/std.math.html#L1647" kind="unittest" beg="1647" end="1655">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:19" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1647">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="isIdentical" href="./htmlsrc/std.math.html#L1664" kind="function" beg="1664" end="1679">isIdentical</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isIdentical" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1664">#</a></dt>
<dd class="ddef">
<div class="summary">Is the binary representation of x identical to y?</div>
Same as ==, except that positive and negative zero are not identical,
 and two <span class="red">NAN</span>s are identical if they have the same 'payload'.</dd>
<dt class="decl">int <a class="symbol _function" name="signbit" href="./htmlsrc/std.math.html#L1685" kind="function" beg="1685" end="1688">signbit</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#signbit" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1685">#</a></dt>
<dd class="ddef">
<div class="summary">Return 1 if sign bit of e is set, 0 if not.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:20" href="./htmlsrc/std.math.html#L1690" kind="unittest" beg="1690" end="1699">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:20" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1690">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="copysign" href="./htmlsrc/std.math.html#L1705" kind="function" beg="1705" end="1714">copysign</a><span class="params">(real <em>to</em>, real <em>from</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#copysign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1705">#</a></dt>
<dd class="ddef">
<div class="summary">Return a value composed of to with from's sign bit.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:21" href="./htmlsrc/std.math.html#L1716" kind="unittest" beg="1716" end="1734">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:21" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1716">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="nan" href="./htmlsrc/std.math.html#L1743" kind="function" beg="1743" end="1743">nan</a><span class="params">(in char[] <em>tagp</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nan" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1743">#</a></dt>
<dd class="ddef">
<div class="summary">Creates a quiet NAN with the information from tagp[] embedded in it.</div>
<p class="sec_header"><span class="red">Bugs:</span></p>DMD always returns real.nan, ignoring the payload.</dd>
<dt class="decl">real <a class="symbol _function" name="nextUp" href="./htmlsrc/std.math.html#L1763" kind="function" beg="1763" end="1833">nextUp</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextUp" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1763">#</a></dt>
<dt class="decl">double <a class="symbol _function" name="nextUp:2" href="./htmlsrc/std.math.html#L1836" kind="function" beg="1836" end="1855">nextUp</a><span class="params">(double <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextUp:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1836">#</a></dt>
<dt class="decl">float <a class="symbol _function" name="nextUp:3" href="./htmlsrc/std.math.html#L1858" kind="function" beg="1858" end="1877">nextUp</a><span class="params">(float <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextUp:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1858">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the next largest floating point value after x.</div>
Return the least number greater than x that is representable as a real;
 thus, it gives the next point on the IEEE number line.
<p class="bl"/>
  <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>nextUp(x)   </th></tr>
    <tr><td>-&infin;</td> <td>-real.max   </td></tr>
    <tr><td>&plusmn;0.0</td> <td>real.min*real.epsilon </td></tr>
    <tr><td>real.max</td> <td>&infin; </td></tr>
    <tr><td>&infin;</td> <td>&infin; </td></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span>   </td></tr>
 </table>
<p class="sec_header">Remarks:</p>This function is included in the forthcoming IEEE 754R standard.</dd>
<dt class="decl">real <a class="symbol _function" name="nextDown" href="./htmlsrc/std.math.html#L1897" kind="function" beg="1897" end="1900">nextDown</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextDown" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1897">#</a></dt>
<dt class="decl">double <a class="symbol _function" name="nextDown:2" href="./htmlsrc/std.math.html#L1903" kind="function" beg="1903" end="1906">nextDown</a><span class="params">(double <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextDown:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1903">#</a></dt>
<dt class="decl">float <a class="symbol _function" name="nextDown:3" href="./htmlsrc/std.math.html#L1909" kind="function" beg="1909" end="1912">nextDown</a><span class="params">(float <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextDown:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1909">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the next smallest floating point value before x.</div>
Return the greatest number less than x that is representable as a real;
 thus, it gives the previous point on the IEEE number line.
<p class="bl"/>
  <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>nextDown(x)   </th></tr>
    <tr><td>&infin;</td> <td>real.max  </td></tr>
    <tr><td>&plusmn;0.0</td> <td>-real.min*real.epsilon </td></tr>
    <tr><td>-real.max</td> <td>-&infin; </td></tr>
    <tr><td>-&infin;</td> <td>-&infin; </td></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span>    </td></tr>
 </table>
<p class="sec_header">Remarks:</p>This function is included in the forthcoming IEEE 754R standard.</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:22" href="./htmlsrc/std.math.html#L1914" kind="unittest" beg="1914" end="1916">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:22" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1914">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="nextafter" href="./htmlsrc/std.math.html#L1936" kind="function" beg="1936" end="1944">nextafter</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextafter" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1936">#</a></dt>
<dt class="decl">float <a class="symbol _function" name="nextafter:2" href="./htmlsrc/std.math.html#L1947" kind="function" beg="1947" end="1955">nextafter</a><span class="params">(float <em>x</em>, float <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextafter:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1947">#</a></dt>
<dt class="decl">double <a class="symbol _function" name="nextafter:3" href="./htmlsrc/std.math.html#L1958" kind="function" beg="1958" end="1966">nextafter</a><span class="params">(double <em>x</em>, double <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextafter:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1958">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the next representable value after x in the direction of y.</div>
If y &gt; x, the result will be the next largest floating-point value;
 if y &lt; x, the result will be the next smallest value.
 If x == y, the result is y.
<p class="sec_header">Remarks:</p>This function is not generally very useful; it's almost always better to use
 the faster functions nextUp() or nextDown() instead.
<p class="bl"/>
 IEEE 754 requirements not implemented on Windows:
 The FE_INEXACT and FE_OVERFLOW exceptions will be raised if x is finite and
 the function result is infinite. The FE_INEXACT and FE_UNDERFLOW
 exceptions will be raised if the function value is subnormal, and x is
 not equal to y.</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:23" href="./htmlsrc/std.math.html#L1968" kind="unittest" beg="1968" end="1981">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:23" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1968">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="fdim" href="./htmlsrc/std.math.html#L1994" kind="function" beg="1994" end="1994">fdim</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fdim" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1994">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the positive difference between x and y.</div>
<p class="sec_header">Returns:</p><table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x, y</th>       <th>fdim(x, y)</th></tr>
      <tr><td>x &gt; y</td>  <td>x - y</td></tr>
      <tr><td>x &lt;= y</td> <td>+0.0</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="fmax" href="./htmlsrc/std.math.html#L1999" kind="function" beg="1999" end="1999">fmax</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fmax" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1999">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the larger of x and y.</div></dd>
<dt class="decl">real <a class="symbol _function" name="fmin" href="./htmlsrc/std.math.html#L2004" kind="function" beg="2004" end="2004">fmin</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fmin" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2004">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the smaller of x and y.</div></dd>
<dt class="decl">real <a class="symbol _function" name="fma" href="./htmlsrc/std.math.html#L2012" kind="function" beg="2012" end="2012">fma</a><span class="params">(real <em>x</em>, real <em>y</em>, real <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fma" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2012">#</a></dt>
<dd class="ddef">
<div class="summary">Returns (x * y) + z, rounding only once according to the
 current rounding mode.</div>
<p class="sec_header"><span class="red">Bugs:</span></p>Not currently implemented - rounds twice.</dd>
<dt class="decl">real <a class="symbol _function" name="pow" href="./htmlsrc/std.math.html#L2018" kind="function" beg="2018" end="2030">pow</a><span class="params">(real <em>x</em>, uint <em>n</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#pow" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2018">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="pow:2" href="./htmlsrc/std.math.html#L2034" kind="function" beg="2034" end="2078">pow</a><span class="params">(real <em>x</em>, int <em>n</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#pow:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2034">#</a></dt>
<dd class="ddef">
<div class="summary">Fast integral powers.</div></dd>
<dt class="decl">real <a class="symbol _function" name="pow:3" href="./htmlsrc/std.math.html#L2123" kind="function" beg="2123" end="2216">pow</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#pow:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2123">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates x<span style="vertical-align:super;font-size:smaller">y</span>.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
 <tr><th>x</th> <th>y</th> <th>pow(x, y)</th>
      <th>div 0</th> <th>invalid?</th></tr>
 <tr><td>anything</td>      <td>&plusmn;0.0</td>                <td>1.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>|x| &gt; 1</td>    <td>+&infin;</td>                  <td>+&infin;</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>|x| &lt; 1</td>    <td>+&infin;</td>                  <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>|x| &gt; 1</td>    <td>-&infin;</td>                  <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>|x| &lt; 1</td>    <td>-&infin;</td>                  <td>+&infin;</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>+&infin;</td>      <td>&gt; 0.0</td>                  <td>+&infin;</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>+&infin;</td>      <td>&lt; 0.0</td>                  <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>-&infin;</td>      <td>odd integer &gt; 0.0</td>      <td>-&infin;</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>-&infin;</td>      <td>&gt; 0.0, not odd integer</td> <td>+&infin;</td>
      <td>no</td>        <td>no</td></tr>
 <tr><td>-&infin;</td>      <td>odd integer &lt; 0.0</td>      <td>-0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>-&infin;</td>      <td>&lt; 0.0, not odd integer</td> <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>&plusmn;1.0</td>   <td>&plusmn;&infin;</td>          <td><span class="red">NAN</span></td>
      <td>no</td>        <td>yes</td> </tr>
 <tr><td>&lt; 0.0</td>      <td>finite, nonintegral</td>        <td><span class="red">NAN</span></td>
      <td>no</td>        <td>yes</td></tr>
 <tr><td>&plusmn;0.0</td>   <td>odd integer &lt; 0.0</td>      <td>&plusmn;&infin;</td>
      <td>yes</td>       <td>no</td> </tr>
 <tr><td>&plusmn;0.0</td>   <td>&lt; 0.0, not odd integer</td> <td>+&infin;</td>
      <td>yes</td>       <td>no</td></tr>
 <tr><td>&plusmn;0.0</td>   <td>odd integer &gt; 0.0</td>      <td>&plusmn;0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>&plusmn;0.0</td>   <td>&gt; 0.0, not odd integer</td> <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:24" href="./htmlsrc/std.math.html#L2218" kind="unittest" beg="2218" end="2232">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:24" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2218">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="mfeq" href="./htmlsrc/std.math.html#L2242" kind="function" beg="2242" end="2251">mfeq</a><span class="params">(real <em>x</em>, real <em>y</em>, real <em>precision</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#mfeq" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2242">#</a></dt>
<dd class="ddef">
<div class="summary">Simple function to compare two floating point values
 to a specified precision.</div>
<p class="sec_header">Returns:</p>1       match
      0       nomatch</dd>
<dt class="decl">int <a class="symbol _function" name="feqrel" href="./htmlsrc/std.math.html#L2268" kind="function" beg="2268" end="2339">feqrel</a><span class="tparams">(X)</span><span class="params">(X <em>x</em>, X <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#feqrel" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2268">#</a></dt>
<dd class="ddef">
<div class="summary">To what precision is x equal to y?</div>
<p class="sec_header">Returns:</p>the number of mantissa bits which are equal in x and y.
 eg, 0x1.F8p+60 and 0x1.F1p+60 are equal to 5 bits of precision.
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>      <th>y</th>          <th>feqrel(x, y)</th></tr>
      <tr><td>x</td>      <td>x</td>          <td>real.mant_dig</td></tr>
      <tr><td>x</td>      <td>&gt;= 2*x</td> <td>0</td></tr>
      <tr><td>x</td>      <td>&lt;= x/2</td> <td>0</td></tr>
      <tr><td><span class="red">NAN</span></td> <td>any</td>        <td>0</td></tr>
      <tr><td>any</td>    <td><span class="red">NAN</span></td>     <td>0</td></tr>
      </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:25" href="./htmlsrc/std.math.html#L2341" kind="unittest" beg="2341" end="2383">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:25" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2341">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">T <a class="symbol _function" name="ieeeMean" href="./htmlsrc/std.math.html#L2401" kind="function" beg="2401" end="2480">ieeeMean</a><span class="tparams">(T)</span><span class="params">(T <em>x</em>, T <em>y</em>)</span>; <span class="attrs">[<span class="prot">package</span>]</span> <a title="Permalink to this symbol" href="#ieeeMean" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2401">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:26" href="./htmlsrc/std.math.html#L2482" kind="unittest" beg="2482" end="2501">unittest</a>; <span class="attrs">[<span class="prot">package</span>]</span> <a title="Permalink to this symbol" href="#unittest:26" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2482">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="poly" href="./htmlsrc/std.math.html#L2515" kind="function" beg="2515" end="2593">poly</a><span class="params">(real <em>x</em>, const real[] <em>A</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#poly" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2515">#</a></dt>
<dd class="ddef">
<div class="summary">Evaluate polynomial A(x) = a<sub>0</sub> + a<sub>1</sub>x + a<sub>2</sub>&sup2;
                          + a<sub>3</sub>x&sup3; ...</div>
Uses Horner's rule A(x) = a<sub>0</sub> + x(a<sub>1</sub> + x(a<sub>2</sub> 
                         + x(a<sub>3</sub> + ...)))
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>A</em></td><td>array of coefficients a<sub>0</sub>, a<sub>1</sub>, etc.</td></tr></table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:27" href="./htmlsrc/std.math.html#L2595" kind="unittest" beg="2595" end="2602">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:27" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2595">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="approxEqual" href="./htmlsrc/std.math.html#L2609" kind="function" beg="2609" end="2642">approxEqual</a><span class="tparams">(T, U, V)</span><span class="params">(T <em>lhs</em>, U <em>rhs</em>, V <em>maxRelDiff</em>, V <em>maxAbsDiff</em> = 0)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#approxEqual" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2609">#</a></dt>
<dd class="ddef">
<div class="summary">Computes whether <span class="d_psymbol"><i>lhs</i></span> is approximately equal to <span class="d_psymbol"><i>rhs</i></span>
   admitting a maximum relative difference <span class="d_psymbol"><i>maxRelDiff</i></span> and a
   maximum absolute difference <span class="d_psymbol"><i>maxAbsDiff</i></span>.</div></dd>
<dt class="decl">bool <a class="symbol _function" name="approxEqual:2" href="./htmlsrc/std.math.html#L2647" kind="function" beg="2647" end="2649">approxEqual</a><span class="tparams">(T, U)</span><span class="params">(T <em>lhs</em>, U <em>rhs</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#approxEqual:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2647">#</a></dt>
<dd class="ddef">
<div class="summary">Returns <span class="d_psymbol"><i>approxEqual(lhs, rhs, 0.01)</i></span>.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:28" href="./htmlsrc/std.math.html#L2651" kind="unittest" beg="2651" end="2658">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:28" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2651">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Copyright © 1999-2008 by Digital Mars ®, All Rights Reserved.</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Dec 28 04:26:41 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>